<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Model;

class Topic extends Model
{
    //禁用时间戳自动管理
    public $timestamps = false;

    protected $table = 'topics';

    //Windows API函数。它用来针对指定的“当地”格式，对一个系统日期进行格式化
    public function getDateFormat(){
        return time();
    }
    public function asDateTime($val){
        return $val;
    }

    public $fillable = ['topic', 'is_show','is_hot'];
}
